import { MidwayConfig, MidwayAppInfo } from '@midwayjs/core';
import { join } from 'path';

export default (appInfo: MidwayAppInfo) => {
  return {
    // use for cookie sign key, should change to your own and keep security
    keys: appInfo.name + '_1703481866553_1338',
    egg: {
      port: 6001,
    },
    // security: {
    //   csrf: false,
    // },
    staticFile: {
      dirs: {
        default: {
          prefix: '/',
          dir: join(__dirname, '../../repo/public'),
          alias: {
            '/': '/index.html',
          },
        }
      }
    },
  } as MidwayConfig;
};
